package com.sun.stringescapeutils;

import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;

public class JsoupTest {
    public static void main(String[] args) {

        String html = "<p><ahref='http://www.baidu/' οnclick='stealCookies()'> 百度一下，你就知道 </a></p>" +
                "<img src=\"memory.jpg\" title=\"回忆总想哭\" width=\"200\" height=\"200\"/>";
        Whitelist img = Whitelist.basic();
        img.addTags("img");

        String doc = Jsoup.clean(html, img);
        System.out.println(doc);
    }
}
